/**
 * @author Maximilian Csuk
 * @author Konrad Paumann
 * @author Bernhard Denner
 */
public class Test {

	/**
	 * 
	 */
	public static void main(String[] args) {
		// Baum aus der Aufgabe
		Node l = new MyInteger(3); 
		Node r = new MyInteger(5);
		Node r2 = new MyFloat(2.7f);
		SingOp trunc = new Trunc(r2);
		Node plus = new Addition(l, r);
		Node root = new Multiplication(plus, trunc);
		System.out.println(root.eval()); 
		
		BinOp multi = new Multiplication(new Int2Float(plus), r2);
		Number ergebnis = multi.eval();
		System.out.println(ergebnis);
		
		multi.setNodes(new Int2Float(plus), new MyFloat(27.3f));
		System.out.println(multi.eval());
		
		multi.setNodes(plus, r2); //NaN da MyInteger mal MyFloat
		System.out.println(multi.eval());
		
		trunc.setNodes(plus);
		System.out.println(trunc.eval()); // NaN da trunc(MyInteger)  
		
	}
}

